package com.lxw.test1.mutiDownload;

import java.util.concurrent.Callable;


class MyCallable implements Callable {
    private final String url;

    public MyCallable(String url) {
        this.url = url;
    }

    @Override
    public Boolean call() throws InterruptedException {
        WebDownloader webDownloader = new WebDownloader();
        System.out.println(Thread.currentThread().getName());
//        if(Thread.currentThread().getName().equals("pool-1-thread-1")){
//            Thread.sleep(2000);
//        }

        webDownloader.downloader("https:" + url);


//            System.out.println("下载了文件名为："+url);

        return true;
    }
}

